# 使用Nginx作为基础镜像
FROM nginx:alpine

# 设置维护者信息
LABEL maintainer="ruoyi"

# 删除Nginx默认配置
RUN rm /etc/nginx/conf.d/default.conf

# 复制Nginx配置文件
COPY nginx.conf /etc/nginx/conf.d/

# 复制前端构建产物到Nginx目录
COPY dist/ /usr/share/nginx/html/

# 暴露端口
EXPOSE 80

# 启动Nginx
CMD ["nginx", "-g", "daemon off;"]